package com.mazsn;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.context.annotation.Configuration;

@Configuration
public class DateFormatConfig {

		public  Date convert(String source) {
			try {
	            Date date = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").parse(source);
	            return date;
	        } catch (ParseException e) {
	            e.printStackTrace();
	        }
			return null;
		}
    	
}
